package cultmob.cine.teste.restlet;

import java.io.IOException;

import org.restlet.resource.Get;
import org.restlet.resource.ResourceException;
import org.restlet.resource.ServerResource;
import org.restlet.resource.ClientResource;

public class HelloWorldResource extends ServerResource {

	 	@Get
	    public String represent() {
	 		String ret = "Error";
	 		try {
	 			ret = new ClientResource("http://www.ingresso.com.br/br/cinema/porcinema.asp?" +
	 					"T_IDCIDADE=00000022&nav=C&Busca=1&DataBusca=25/03/2013" +
	 					"&IdGrupoBusca=00000697&IdCidadeCompra=00000022#").get().getText();
	 		} catch (ResourceException e) {
	 			// TODO Auto-generated catch block
	 			e.printStackTrace();
	 		} catch (IOException e) {
	 			// TODO Auto-generated catch block
	 			e.printStackTrace();
	 		}
	        return ret;
	    }
	 	
	 	ClientResource cr = new ClientResource("http://restlet.org");
	 	
//	 	public String getTest(){
//	 		return ret;
//	 	}
	 	
	 	public static void main(String[] args) throws ResourceException, IOException {
		}
	 	
}
